package me.zhengjie.modules.pay.enums;

import lombok.Getter;

@Getter
public enum StatusEnum {
    /** ========================= 全局开启/关闭 【0/1】 ==================================== */
    STATUS_ON(0,"开启"),
    STATUS_OFF(1,"关闭"),

    /** ========================= 支付状态 ==================================== */
    ORDER_DEFAULT_STATUS(0,"订单默认状态【创建订单但没有到支付页面】"),
    SUCCESS(1, "SUCCESS"),  // 支付成功
    REFUND(2, "REFUND"),    // 转入退款
    NOTPAY(3, "NOTPAY"),    // 未支付
    CLOSED(4, "CLOSED"),    // 已关闭
    REVOKED(5, "REVOKED"),  // 已撤销
    USERPAYING(6, "USERPAYING"),    // 用户支付中
    PAYERROR(7, "PAYERROR"),    // 支付失败
    AWAITCLOSED(8, "AWAITCLOSED"),  // 待关闭【用户点击取消订单，等待定时任务关闭订单】

    /** ========================= 售后表售后状态(tz_sold_order) =============================== */
    AUDIT_DEFAULT(1, "待审核"),
    AUDIT_START(2, "已审核待收货"),
    AUDIT_END(3, "已完成【已收到货，退款，补充库存】"),
    AUDIT_REJECTED(4, "已拒绝"),

    /** ========================= 订单表售后状态（tz_pay_order） =============================== */
    SOLD_DEFAULT(1,"未售后"),
    SOLD_START(2,"售后中"),
    SOLD_END(3,"已售后"),

    /** ========================= 订单发货状态(tz_pay_order) =============================== */
    LOGISTICS_DEFAULT(0,"未发货"),
    LOGISTICS_START(1,"已发货"),
    LOGISTICS_END(2,"已收货"),

    /** ========================= 订单状态（小程序展示页面） =============================== */
    ALL_ORDER(0,"全部订单"),
    ORDER_AWAIT_PAY(1,"待付款"),
    ORDER_AWAIT_RECEIVE(2,"待收货"),
    ORDER_SUCCESS(3,"已完成"),
    ORDER_AWAIT_SOLD(4,"待售后"),

    /** ============================= 售后类型 ==============================*/
    SOLD_TYPE_ONE(1,"退款不退货"),
    SOLD_TYPE_TWO(2,"退款退货"),

    /** ========================== 订单创建类型 ================================= */
    COMMON_CREATE(0,"正常购买创建订单"),
    CART_CREATE(1,"购物车创建订单"),

    /** ========================== 购物车状态 ================================= */
    CART_SHOW(0,"展示"),
    CART_AWAIT_DELETE(1,"待删除"),
    
    /** ============================= 地址是否默认 ====================*/
    ADDRESS_DEFAULT(1,"默认"),


    /** =========================== 预约咨询 ======================== */
    RESERVE_DEFAULT(0,"未处理"),
    RESERVE_SOLVE(1,"已处理"),

    /** =========================== 商品上下架状态 ======================== */
    PRODUCT_OFF(0,"下架"),
    PRODUCT_ON(1,"上架"),


    /** =================== 保 稳 冲 ====================================*/
    STATUS_SAFE(1,"稳"),
    STATUS_SURE(2,"保"),
    STATUS_SPRINT(3,"冲"),

    /** =================== 轮播图展示状态 ====================================*/
    SLIDE_HIDDEN(0,"隐藏"),
    SLIDE_SHOW(1,"展示"),
    ;


    private final int code;
    private final String message;

    StatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}